#ifndef BENDEDELEMENT_H
#define BENDEDELEMENT_H

#include <QObject>
#include "geometry/math3d.h"
#include "geometry/vertex3D.h"
#include "geometry/verticesalongthearc.h"

/** 弯头信息 */
class BendedElement: public QObject {
public:
    BendedElement(Vertex3D *n1, Vertex3D *n2, Vertex3D *c, Vertex3D *ref, double rad) {
        node1Vertex = n1; node2Vertex = n2;
        center = c; reference = ref; radius = rad;
    }
    virtual Vertex3D *getCenter() {
        return center;
    }
    virtual Vertex3D *getReference() {
        return reference;
    }
    virtual double getRadius() {
        return radius;
    }
    virtual QList<Vertex3D*> *getArc(int segment) {
        return VerticesAlongTheArc(node1Vertex, node2Vertex, center, radius, segment);
    }
private:
    Vertex3D *center, *reference;
    Vertex3D *node1Vertex, *node2Vertex;
    double radius;
};

#endif // BENDEDELEMENT_H
